package com.yangfei.mystudy1020.activity;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;

import com.yangfei.mystudy1020.R;
import com.yangfei.mystudy1020.utils.PerformanceCheck;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class SendIntentActivity extends Activity {

    @BindView(R.id.bt_send)
    Button btSend;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        PerformanceCheck.performanceLog(new Exception());
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_send_intent);
        ButterKnife.bind(this);
    }

    @OnClick(R.id.bt_send)
    public void sendIntent() {
        String mPackageName = "com.edog.car";
//        Intent intent = new Intent(Intent.ACTION_MAIN);
//        intent.setComponent(new ComponentName(mPackageName, "com.kaolafm.auto.home.MainActivity"));
        Intent intent = this.getPackageManager().getLaunchIntentForPackage(mPackageName);
        startActivity(intent);
    }
}
